package windowFactoryPackage;

import javax.swing.*;
import java.awt.*;

public class LiscencesWindow extends WindowGenerator{
	private JTabbedPane tabbedPane;
	private JPanel EULAPanel, liscencePanel;
	private JScrollPane jspEULA, jspLiscence;
	static JTextArea jtaEULA = new JTextArea("This is where the EULA goes");
	static JTextArea jtaLiscence = new JTextArea("This is where the liscence goes");
	
	public LiscencesWindow(){
		setLayout(new BorderLayout());
		
		tabbedPane = new JTabbedPane();
		
		liscencePanel = new JPanel();
		liscencePanel.setLayout(new BorderLayout());
		jtaLiscence.setEditable(false);
		jtaLiscence.setLineWrap(true);
		jtaLiscence.setWrapStyleWord(true);
		
		jspLiscence = new JScrollPane(jtaLiscence);
		jspLiscence.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
		jspLiscence.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		liscencePanel.add(jspLiscence, BorderLayout.CENTER);
		tabbedPane.addTab("Liscence", liscencePanel);
		EULAPanel = new JPanel();
		EULAPanel.setLayout(new BorderLayout());
		
		jtaEULA.setEditable(false);
		jtaEULA.setLineWrap(true);
		jtaEULA.setWrapStyleWord(true);
		
		jspEULA = new JScrollPane(jtaEULA);
		jspEULA.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
		jspEULA.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		EULAPanel.add(jspEULA, BorderLayout.CENTER);
		
		tabbedPane.addTab("EULA", EULAPanel);
		
		add(tabbedPane, BorderLayout.CENTER);
	}
}
